package com.zhongkai.model3;

import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Objects;

@Entity
@Table(name = "mess_center", catalog = "")
public class MessCenter implements Serializable {
    private Long id;
    private String messContents;
    private Long messTime;
    private String appName;
    private String appPhone;
    private String isDispose;

    @Id
    @GenericGenerator(name = "generator", strategy = "increment")
    @GeneratedValue(generator = "generator")
    @Column(name = "id")
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Basic
    @Column(name = "mess_contents")
    public String getMessContents() {
        return messContents;
    }

    public void setMessContents(String messContents) {
        this.messContents = messContents;
    }

    @Basic
    @Column(name = "mess_time")
    public Long getMessTime() {
        return messTime;
    }

    public void setMessTime(Long messTime) {
        this.messTime = messTime;
    }

    @Basic
    @Column(name = "app_name")
    public String getAppName() {
        return appName;
    }

    public void setAppName(String appName) {
        this.appName = appName;
    }

    @Basic
    @Column(name = "app_phone")
    public String getAppPhone() {
        return appPhone;
    }

    public void setAppPhone(String appPhone) {
        this.appPhone = appPhone;
    }

    @Basic
    @Column(name = "is_dispose")
    public String getIsDispose() {
        return isDispose;
    }

    public void setIsDispose(String isDispose) {
        this.isDispose = isDispose;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        MessCenter that = (MessCenter) o;
        return Objects.equals(id, that.id) &&
                Objects.equals(messContents, that.messContents) &&
                Objects.equals(messTime, that.messTime) &&
                Objects.equals(appName, that.appName) &&
                Objects.equals(appPhone, that.appPhone) &&
                Objects.equals(isDispose, that.isDispose);
    }

    @Override
    public int hashCode() {

        return Objects.hash(id, messContents, messTime, appName, appPhone, isDispose);
    }
}
